/*
 * Copyright 2009 Thor Hovden
 *  
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *  
 *     http://www.apache.org/licenses/LICENSE-2.0
 *  
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
 * either express or implied. See the License for the specific
 * language governing permissions and limitations under the
 * License. 
 */
package dev.sketch;

import java.util.ArrayList;

/**
 * A tangible action, information is sent or presented somewhere
 * 
 * @author Thor Hovden
 */
public class Action {
	public enum Type {
		DISPLAY
		// TODO add more actions to handle
	}

	private Type type;
	private String text;

	/**
	 * Set up an action
	 * 
	 * @param context
	 * @param type
	 * @param text
	 */
	public Action(Type type, String text) {
		this.type = type;
		this.text = text;
	}

	/**
	 * @return action text
	 */
	public String getText() {
		return this.text;
	}

	/**
	 * @return action type
	 */
	public Type getType() {
		return this.type;
	}

	/**
	 * Make a collection class of enclosing type. This requires static class and simplifies code.
	 * 
	 * @author Thor Hovden
	 */
	public static class List extends ArrayList<Action> {
		/** Serialization key */
		private static final long serialVersionUID = -6652284728613134034L;
	}
}
